
package com.craterhill.java.ems.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.craterhill.java.ems.common.beans.SchoolLevel;
import com.craterhill.java.ems.dao.utils.EMSResultSetExtractor;

public interface SchoolLevelDao extends EMSDao<SchoolLevel> {

	public final String FIELD_LIST = "obj.school_level_id, obj.school_level";

	public final String FIND_ALL = "select " + FIELD_LIST + " from school_level obj";

	public final class SchoolLevelExtractor extends EMSResultSetExtractor<SchoolLevel> {

		@Override
		protected SchoolLevel extractResultSetData(ResultSet resultSet) throws SQLException {
			SchoolLevel schoolLevel = new SchoolLevel();
			schoolLevel.setSchoolLevelId(resultSet.getInt(1));
			schoolLevel.setSchoolLevel(resultSet.getString(2));
			return schoolLevel;
		}
	}
}
